﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ABMCategorias.ascx.cs" Inherits="PresentacionWeb.ControlesDeUsuario.ABMCategorias" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>

<cc1:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="2" 
    Width="406px">
    <cc1:TabPanel runat="server" HeaderText="TabPanel1" ID="TabPanel1">
    <HeaderTemplate>
        Alta
        
        
</HeaderTemplate>
        
    
<ContentTemplate>
    <p align="center">
        <asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Size="Large" Text="Alta de Categoria"></asp:Label>
    </p>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <asp:Label ID="lblErrorAlta" runat="server" ForeColor="Red"></asp:Label>
                
 
            </ContentTemplate>
            
        </asp:UpdatePanel>
        

    
    
    <div>
        
 

        <asp:Label ID="Label2" runat="server" Text="Categoria"></asp:Label>
        

 <asp:TextBox ID="txtCategoria" 
            runat="server" Height="22px" Width="160px"></asp:TextBox>

 

        <br />
        
        <br />

    </div>
     <div>
         <asp:Button ID="btnCrear" runat="server" OnClick="btnCrear_Click" 
             Text="Crear Categoria"></asp:Button>
     
     </div>    
    
        
    
    
</ContentTemplate>
        
    
</cc1:TabPanel>
    <cc1:TabPanel runat="server" HeaderText="TabPanel2" ID="TabPanel2">
    <HeaderTemplate>
        Modificacion
        
        
</HeaderTemplate>
        
    
<ContentTemplate>
  
    <p align="center">
        

        <asp:Label ID="Label3" runat="server" Font-Bold="True" Font-Size="Large" Text="Modificacion de Categoria"></asp:Label>

    </p>
        
        <asp:UpdatePanel ID="UpdatePanel2" runat="server">
            <ContentTemplate>
                <asp:Label ID="lblErrorModificacion" runat="server" ForeColor="Red"></asp:Label>
                           </ContentTemplate>
        </asp:UpdatePanel>
                  
                  <div align="left">
         <br />
         
        </div>
 
         <asp:UpdatePanel ID="UpdatePanel4" runat="server" UpdateMode="Conditional">
                <ContentTemplate>
                     <asp:GridView ID="gvCategorias" runat="server" AutoGenerateColumns="False" 
                        OnSelectedIndexChanged="gvCategorias_SelectedIndexChanged" Width="100%">
                        <Columns>

                            <asp:CommandField ShowSelectButton="True" />
                            
                            <asp:BoundField HeaderText="IdCategoria" ReadOnly="True" DataField="CatId">
                                
                                <HeaderStyle BackColor="#999966" />
                                
                            </asp:BoundField>
                            
                            <asp:BoundField HeaderText="Descripcion" ReadOnly="True" DataField="CatDescripcion">
                              <HeaderStyle BackColor="#999966" />
                            </asp:BoundField>
                            <asp:CheckBoxField HeaderText="Estado" >
                            <HeaderStyle BackColor="#999966" />
                            </asp:CheckBoxField>
                         </Columns>
                        
                    </asp:GridView>
                    

                </ContentTemplate>
                

            </asp:UpdatePanel>
        

        <br />
        

        <asp:Panel ID="Panel1" runat="server">
            

            <asp:UpdatePanel ID="UpdatePanel5" runat="server" ChildrenAsTriggers="False" 
                UpdateMode="Conditional">
                

                <ContentTemplate>
                    

        <asp:Label ID="Label5" runat="server" Text="IdCategoria"></asp:Label>
                    

                    <asp:TextBox ID="txtIdCategoria" runat="server" ReadOnly="True"></asp:TextBox>
                    

        <br />
                    

        <asp:Label ID="txtNombre" runat="server" Text="Nombre"></asp:Label>
                    

        

        <asp:TextBox ID="txtNombreCatModif" runat="server"></asp:TextBox>
                    

        <br />
                    

        <asp:CheckBox ID="cbEstadoCategoria" runat="server" Text="Deshabilitada" 
            TextAlign="Left" />
                    

        <br />
        
                    
 

        
                </ContentTemplate>
                

                <Triggers>
                    

                    <asp:AsyncPostBackTrigger ControlID="gvCategorias" 
                        EventName="SelectedIndexChanged" />
                    

                </Triggers>
                

            </asp:UpdatePanel>
            

        </asp:Panel>
        <br />

        <asp:Button ID="btnGuardar" runat="server" Text="Guardar" 
            onclick="btnGuardar_Click" />
        
        
 

        
       <br />
        
 
    
        
 
    
</ContentTemplate>
        
    
</cc1:TabPanel>
    <cc1:TabPanel ID="TabPanel3" runat="server" HeaderText="TabPanel3">
    <HeaderTemplate>
        Baja
        
        
</HeaderTemplate>
        
    
<ContentTemplate>
        

    <p align="center">
        

        <asp:Label ID="Label4" runat="server" Font-Bold="True" Font-Size="Large" Text="Baja de Categorias"></asp:Label>

        

    </p>
        

        <asp:UpdatePanel ID="UpdatePanel3" runat="server"><ContentTemplate>
                

                <asp:Label ID="lblErrorBaja" runat="server" ForeColor="Red"></asp:Label>
                

            
</ContentTemplate>
</asp:UpdatePanel>

        

        <asp:UpdatePanel ID="UpdatePanel6" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
             

         <asp:GridView ID="gvCategoriasBaja" runat="server" AutoGenerateColumns="False" 
                         Width="100%">
                         

                         <Columns>
                             

                             <asp:TemplateField>
                                 

                                 <ItemTemplate>
                                     

                                     <asp:CheckBox ID="cbSeleccionada" runat="server" />
                                     

                                 </ItemTemplate>
                                 

                             </asp:TemplateField>
                             

                             <asp:BoundField DataField="CatDescripcion" HeaderText="Nombre" 
                                 ReadOnly="True">
                                 

                                 <HeaderStyle BackColor="#999966" />
                                 

                             </asp:BoundField>
                             

                             <asp:BoundField DataField="CatId" HeaderText="IdCategoria" ReadOnly="True">
                                 

                                 <HeaderStyle BackColor="#999966" />
                                 

                             </asp:BoundField>
                         </Columns>
                     </asp:GridView>
             <br />
             

           
         
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnEliminarCategorias" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
  <asp:Button ID="btnEliminarCategorias" runat="server" 
                 Text="Eliminar Seleccionados" 
        onclick="btnEliminarCategorias_Click" UseSubmitBehavior="False" />
    

    
</ContentTemplate>
        
    
</cc1:TabPanel>
</cc1:TabContainer>
